<form method="get" action="set_search.php">

<input type="text" name="searchWord" value="<? echo $_REQUEST["searchWord"] ?>">
<input type='submit' name='submit' value="Find item">

</form>
<?
if ($_REQUEST["searchWord"])
{
$files["gen_inc.php"] = "General Settings";
$files["opt_inc.php"] = "Option Settings";
$files["pay_inc.php"] = "Payment Settings";

foreach ($files as $key => $value) 
{

	$options=file("config/" . $key . ".txt");

	foreach ($options as $line)
	{
		$line=trim($line);
		
		if (!empty($line))
		{
			$tmp_split = split("\|",$line);
			$type = $tmp_split[0];	
			$varname = $tmp_split[1];
			$title = $tmp_split[2];
			$question = $tmp_split[3];
			$lSearchWord=$_REQUEST["searchWord"];
	
			if (eregi($lSearchWord,$title) || eregi($lSearchWord,$varname) || eregi($lSearchWord,$question))
			{
				echo "$title<br>";
			}
		}
	}
}
}
?>

